<!doctype html>
<html>
<head>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
<div class="container-fluid">
    <div class="row justify-content-md-center">
        <div class="w-100">
            <div class="alert alert-primary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>获取日志清单</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>GET /log</td>
                    </tr>
                    <tr>
                        <th rowspan="7">参数</th>
                    </tr>
                    <tr>
                        <th>filterName</th>
                        <td>预置过滤器名称，字符串，允许空。</td>
                    </tr>
                    <tr>
                        <th>query</th>
                        <td>自定义查询表达式（参见阿里云文档），字符串，允许空。</td>
                    </tr>
                    <tr>
                        <th>startWith</th>
                        <td>起始时间范围，ISO日期格式：yyyy-MM-dd，空值默认当前系统时间减去24小时。</td>
                    </tr>
                    <tr>
                        <th>endWith</th>
                        <td>截止时间范围，ISO日期格式：yyyy-MM-dd，空值默认当前系统时间。</td>
                    </tr>
                    <tr>
                        <th>line</th>
                        <td>分页，请求行数，默认十条</td>
                    </tr>
                    <tr>
                        <th>offset</th>
                        <td>分页，偏移量/起始位置，默认0</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，数组嵌套对象： [{"time":"2020-01-01 12:12:12",...},…{}]</td>
                    </tr>
                    <tr>
                        <th>字段集</th>
                        <td>time,cloud,ipAddr,side,apiType,timed,method,user,msg,__tag__:__hostname__</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl http://192.168.0.44:8096/log?startWith=2019-12-30</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.getJSON("/log", {filterId: 1,query: "a=b"}, function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-secondary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>获取采集节点清单</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>GET /agent</td>
                    </tr>
                    <tr>
                        <th>参数</th><td>无</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，（分组）对象嵌套（节点）数组： {"分组A":[{"hostname":"MyHostName",...},…{}]}</td>
                    </tr>
                    <tr>
                        <th>字段集</th>
                        <td>machine-uniqueid,hostname,ip,userdefined-id,displayName,lastHeartbeatTime</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl http://192.168.0.44:8096/agent</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.getJSON("/agent", function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-success" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>备案采集节点</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>POST /agent</td>
                    </tr>
                    <tr>
                        <th rowspan="6">参数</th>
                    </tr>
                    <tr>
                        <th>uuid</th>
                        <td>logtail生成的标示符，通过文件app_info.json(Linux: /usr/local/ilogtail或Windows: C:\Program Files\Alibaba\Logtail)查看。</td>
                    </tr>
                    <tr>
                        <th>hostname</th>
                        <td>logtails获取的主机名，通过文件app_info.json(Linux: /usr/local/ilogtail或Windows: C:\Program Files\Alibaba\Logtail)查看。</td>
                    </tr>
                    <tr>
                        <th>machineGroup</th>
                        <td>日志服务云端配置的机器组名称。</td>
                    </tr>
                    <tr>
                        <th>displayName</th>
                        <td>内部名称，用于通过映射关系，替代日志中的hostname</td>
                    </tr>
                    <tr>
                        <th>identifier</th>
                        <td>机器标识符，根据日志服务云端配置，使用局域网IP或者用户自定义（参见阿里云文档），</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，数组嵌套对象： [{"time":"2020-01-01 12:12:12",...},…{}]</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>time,cloud,ipAddr,side,apiType,timed,method,user,msg,__tag__:__hostname__</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl -d "uuid=aa-bb-cc&hostname=ibm-pc-64&machineGroup=group1&displayName=xx前置机&identifier=192.168.1.23" http://192.168.0.44:8096/agent</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.post("/agent", {uuid: 'aa-bb-cc',hostname: 'ibm-pc-64', machineGroup: 'group1', displayName: 'xx前置机'， identifier: '192.168.1.23'}, function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-primary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>获取预置过滤器清单</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>GET /filter</td>
                    </tr>
                    <tr>
                        <th rowspan="3">参数</th>
                    </tr>
                    <tr>
                        <th>page</th>
                        <td>分页，页码，默认0</td>
                    </tr>
                    <tr>
                        <th>size</th>
                        <td>分页，页记录数，默认10</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，数组嵌套对象： [{"name":"filter1", queries: ["a=b","c>3"]},…{}]</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>name,queries</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl http://192.168.0.44:8096/filter</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.getJSON("/filter", function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-secondary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>新增预置过滤器</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>POST /filter</td>
                    </tr>
                    <tr>
                        <th rowspan="3">参数</th>
                    </tr>
                    <tr>
                        <th>name</th>
                        <td>预置过滤器名称</td>
                    </tr>
                    <tr>
                        <th>queries</th>
                        <td>符合阿里日志服务标准的查询字符串</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON对象： {"name":"filter1", "queries":['a=b','c>3']}</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>name,queries</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl -d "name=filter1&queries=c>2" http://192.168.0.44:8096/filter</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.post("/log", {name: 'filter1',queries: "a=b"}, function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-success" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>获取用户清单</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>GET /user</td>
                    </tr>
                    <tr>
                        <th rowspan="3">参数</th>
                    </tr>
                    <tr>
                        <th>page</th>
                        <td>分页，页码，默认0</td>
                    </tr>
                    <tr>
                        <th>size</th>
                        <td>分页，页记录数，默认10</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，数组嵌套对象： [{"username":"jack", roles:['user']},…{}]</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>username,roles</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl http://192.168.0.44:8096/user?line=10&offset=1</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.getJSON("/user", {line: 10, offset: 1}, function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-secondary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>新增用户</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>POST /user</td>
                    </tr>
                    <tr>
                        <th rowspan="4">参数</th>
                    </tr>
                    <tr>
                        <th>username</th>
                        <td>用户名</td>
                    </tr>
                    <tr>
                        <th>password</th>
                        <td>密码</td>
                    </tr>
                    <tr>
                        <th>roleName</th>
                        <td>角色名</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON对象： {"username":"jack",roles:['user']}</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>username, roles</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl -d "username=jack&password=123&roleName=user" http://192.168.0.44:8096/user</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.post("/user", {username: 'jack',password: "123", roleName: 'user'}, function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-success" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>获取当前用户的预置过滤器</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>GET /owned/current</td>
                    </tr>
                    <tr>
                        <th>参数</th><td>无</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，数组嵌套对象： [{"name":"preFilter1",queries:['a=b','c>3']},…{}]</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>name,queries</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl http://192.168.0.44:8096/owned/current</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.getJSON("/owned/current", function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-primary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>获取用户与过滤器绑定清单</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>GET /owned</td>
                    </tr>
                    <tr>
                        <th rowspan="3">参数</th>
                    </tr>
                    <tr>
                        <th>page</th>
                        <td>分页，页码，默认0</td>
                    </tr>
                    <tr>
                        <th>size</th>
                        <td>分页，页记录数，默认10</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON，数组嵌套对象： [{"username":"jack",filterName:'preFilter1'},…{}]</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>username,filterName</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl http://192.168.0.44:8096/owned?line=10</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.getJSON("/owned", function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="alert alert-secondary" role="alert">
                <table class="table table-striped table-responsive-md">
                    <thead>
                    <tr>
                        <th colspan="2">接口名称</th>
                        <th>绑定用户与预置过滤器</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th colspan="2">访问方法(Method)及路径(Path)</th>
                        <td>POST /owned</td>
                    </tr>
                    <tr>
                        <th rowspan="3">参数</th>
                    </tr>
                    <tr>
                        <th>username</th>
                        <td>用户名</td>
                    </tr>
                    <tr>
                        <th>filterName</th>
                        <td>预置过滤器名称</td>
                    </tr>
                    <tr>
                        <th rowspan="3">返回值</th>
                    </tr>
                    <tr>
                        <th>结构</th>
                        <td>JSON对象： {"username":"jack","filterName":"preFilter1"}</td>
                    </tr>
                    <tr>
                        <th>字段</th>
                        <td>username,preFilter1</td>
                    </tr>
                    <tr>
                        <th rowspan="3">调用示例</th>
                    </tr>
                    <tr>
                        <th>curl</th>
                        <td>curl -d "username=jack&filterName=preFilter1" http://192.168.0.44:8096/owned</td>
                    </tr>
                    <tr>
                        <th>jquery</th>
                        <td>$.post("/owned", {username: 'jack',filterName: "preFilter1"}, function (result) {…});</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>